<template>
  <div>
    <a-list item-layout="horizontal" :data-source="props.postList">
      <template #renderItem="{ item }">
        <a-list-item>
          <a-list-item-meta>
            <template #description>
              <span href="#" v-html="item.content"></span>
            </template>
            <template #title>
              <a href="#" v-html="item.title"></a>
            </template>
            <template #avatar>
              <a-avatar :src="snow" />
            </template>
          </a-list-item-meta>
        </a-list-item>
      </template>
    </a-list>
  </div>
</template>

<script setup lang="ts">
import snow from "../assets/snow.jpeg";
import { withDefaults, defineProps } from "vue";

interface Props {
  postList: any[];
}

const props = withDefaults(defineProps<Props>(), {
  postList: () => [],
});
</script>

<style scoped>
.snow {
  width: 200px;
}
</style>
